package com.wang.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wang.Dto.UserPasswordDTO;
import com.wang.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 用户信息表 Mapper 接口
 * </p>
 *
 * @author anonymous
 * @since 2022-05-16
 */
public interface UserMapper extends BaseMapper<User> {
//    Page<User>  findPage(Page<User> page, @Param("username") String username, @Param("nick_name") String nickname);
    @Update("update user set password = #{newPassword} where username = #{username} and password = #{password}")
    int updatePassword(UserPasswordDTO userPasswordDTO);
}
